import Url from "@/utils/base";
let baseURL = Url.baseURL
const config = {
    //  图片上传路径
    // http://10.106.45.29:9898/
    // updateAction: "http://10.106.44.77:9996/api-v1/upload/editorFile",
    updateAction: `${baseURL}/api-v2/artist/uploadFile`,
    // updateAction: "https://api.artube.cc/api-v2/work/uploadImage",

    updateImgAction: `${baseURL}/api-v2/work/uploadImage`,



    // updateAction: "http://api.luckyverse.cc/api-v1/upload/editorFile",
    // 截图上传图片
    // uploadCut: `http://10.106.44.77:9996/api-v1/upload/baseUpload`,
    // uploadCut: `http://api.luckyverse.cc/api-v1/upload/baseUpload`,
    randomdStr: function(number) {
        // 10个数字 + 26个字母
        const arr = ["m", "0", "j", "f", "8", "o", "z", "w", "5", "t", "p", "a", "1", "d", "s", "h", "v", "x", "9",
            "b", "r", "y", "2", "e", "7", "4", "3", "q", "6", "n", "u", "l", "c", "g", "i", "k"
        ];
        const resArr = [];
        for (let i = 0; i < number; i++) {
            const index = randomInt(0, 35);
            resArr.push(arr[index]);
        }
        // 返回结果
        return resArr.join('');
    }
}

function randomInt(minNum, maxNum) {
    const chioces = maxNum - minNum + 1; //可能数的总数 
    return Math.floor(Math.random() * chioces + minNum);
}


export default config